import com.phidgets.InterfaceKitPhidget;
import com.phidgets.PhidgetException;

public class LEDController 
{
	private InterfaceKitPhidget ifKit = null;
	private State state;
	
	public LEDController(State state)
	{
		this.state = state;
		try 
		{
			ifKit = new InterfaceKitPhidget();
		} 
		catch (PhidgetException e) 
		{
		}
	}
	
	public void startProgram()
	{
		try 
		{
			ifKit.openAny();
		} 
		catch (PhidgetException e) 
		{
		}
	}
	
	public void LEDOn(int i)
	{
		try 
		{
			ifKit.setOutputState(i, true);
		} 
		catch (PhidgetException e) 
		{
		}
	}
	
	public void LEDOff(int i)
	{
		try 
		{
			ifKit.setOutputState(i, false);
		} 
		catch (PhidgetException e) 
		{
		}
	}
	
	public void endProgram()
	{
		try 
		{
			ifKit.close();
		} 
		catch (PhidgetException e) 
		{
		}
	}
}